/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package springinyeccion;

import java.util.Locale;
import modelo.Dao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author odeen
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
            ApplicationContext aplicacion = new ClassPathXmlApplicationContext("externalizacion.xml");
            Dao dao = (Dao) aplicacion.getBean("dao");
            dao.conectar();

            System.out.println(aplicacion.getMessage("saludo", new Object[]{}, new Locale("es","ES")));
            System.out.println(aplicacion.getMessage("suma", new Object[]{10,2,12}, new Locale("es","ES")));
    }
}
